Skip to main content

What is GDAL Scripts?

GDAL Scripts is a collection of Python-based utilities for planetary data processing, developed and maintained by the USGS Astrogeology Science Center. These scripts extend the capabilities of the Geospatial Data Abstraction Library (GDAL) to address specific challenges in processing planetary science data from missions studying the Moon, Mars, and other celestial bodies.
This project is hosted on GitHub at thareUSGS/GDAL_scripts

Key Capabilities

The GDAL Scripts collection provides specialized tools organized into several categories:

Coordinate Transformations

Convert between pixel, meter, and lat/lon coordinate systems with scripts like pixel2longlat.py, longlat2meters.py, and meters2longlat.py

Terrain Analysis

Calculate specialized slopes using various baseline lengths with gdal_baseline_slope.py, implementing methods developed specifically for planetary terrain analysis

Format Conversion

Convert between planetary data formats including ISIS3, PDS3, PDS4, and standard geospatial formats

Projection Systems

Work with IAU2000/2009/2015 coordinate reference systems for planetary bodies through WKT representations

Additional Tools

  • Data Clipping & Range: gdal_clip2range.py for clipping pixel values to valid ranges
  • Image Matching: gdal_match_image_extents.py for aligning image extents
  • Metadata Operations: Scripts for copying labels, extracting metadata, and working with HDF5 subdatasets
  • Spatial Data: Convert ISIS miner results, footprints, and STAC items to shapefiles
  • 3D Data: Generate PLY point clouds, XYZ coordinate exports in geocentric space

Problems It Solves

Planetary Data Processing Challenges

Working with planetary science data presents unique challenges that standard geospatial tools don’t always address:
  1. Non-Earth Coordinate Systems: Planetary bodies require specialized coordinate reference systems defined by the IAU (International Astronomical Union), not the Earth-based EPSG codes used in most GIS software.
  2. Mission-Specific Formats: Data from NASA and international missions often comes in specialized formats like ISIS3 cubes or PDS (Planetary Data System) files that need conversion for analysis.
  3. Terrain Analysis: Planetary surfaces require specialized slope calculations with variable baseline lengths to analyze terrain at different scales, particularly important for landing site selection.
  4. Large-Scale Processing: Processing global datasets of planetary bodies requires efficient batch operations and automation.

Who Should Use GDAL Scripts?

Planetary Scientists

Researchers analyzing data from lunar, martian, and other planetary missions

Mission Planners

Teams selecting landing sites and planning rover traverses

Cartographers

Specialists creating maps and mosaics of planetary surfaces

Data Engineers

Engineers building pipelines for planetary data processing and distribution

Repository Structure

The repository is organized into individual directories, each containing a specific script or set of related scripts:
GDAL_scripts/
├── gdal2Coordinates/          # Coordinate conversion utilities
├── gdal_baseline_slope/       # Terrain analysis tools
├── gdal_clip2range/           # Data range clipping
├── gdal2ISIS3/                # ISIS3 format conversion
├── OGC_IAU2000_WKT_v2/       # IAU coordinate reference systems
├── PDS4gdal/                  # PDS4 format tools
├── gdal2PLY/                  # Point cloud generation
└── [30+ additional tools]
Each directory typically contains:
  • Python script(s)
  • README.md with usage instructions
  • Example data or test files (where applicable)

Next Steps